/**
 * 
 */
package com.soap;

/**
 * @author Administrator
 *
 */
public SoapObject getWeather(String city) throws Exception {
    SoapObject request = new SoapObject("http://www.webservicex.net", "GetWeatherByPlaceName");
    request.addProperty("PlaceName", city);
        
    SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
    envelope.setOutputSoapObject(request);
    // It seems that it is a .NET Web service because it doesn't work without next line
    envelope.dotNet = true;

    HttpTransportSE transport = new HttpTransportSE("http://www.webservicex.net/WeatherForecast.asmx");
    transport.call("http://www.webservicex.net/GetWeatherByPlaceName", envelope);
    
    return (SoapObject) envelope.getResponse();
}